﻿namespace SalesPortal.Web.HttpHandlers
{
    using System;
    using System.Web;

    /// <summary>
    /// Reference: https://support.microsoft.com/en-us/kb/308001
    /// https://msdn.microsoft.com/en-us/library/ms228090.aspx
    /// </summary>
    public class SyncHandler : IHttpHandler
    {
        /// <summary>
        /// Because this is a synchronous handler, 
        /// return False for the IsReusable property so that the handler is not pooled.
        /// </summary>
        public bool IsReusable
        {
            get { return false; }
        }

        public void ProcessRequest(HttpContext context)
        {
            context.Response.Write("Hello from custom handler.");
        }
    }
}